Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 23, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/getsentry/sentry-go v0.33.0 -> v0.34.0 age adoption passing confidence

Release Notes

getsentry/sentry-go (github.com/getsentry/sentry-go)

v0.34.0: 0.34.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry Go SDK v0.34.0.

Breaking Changes
  • Logrus structured logging support replaces the sentrylogrus.Hook signature from a *Hook to an interface.
var hook *sentrylogrus.Hook
hook = sentrylogrus.New(
    // ... your setup
)

// should change the definition to 
var hook sentrylogrus.Hook
hook = sentrylogrus.New(
    // ... your setup
)
Features
ctx := context.Background()
handler := sentryslog.Option{
    EventLevel: []slog.Level{slog.LevelError, sentryslog.LevelFatal}, // Only Error and Fatal as events
    LogLevel:   []slog.Level{slog.LevelWarn, slog.LevelInfo},         // Only Warn and Info as logs
}.NewSentryHandler(ctx)
logger := slog.New(handler)
logger.Info("hello"))
logHook, _ := sentrylogrus.NewLogHook(
    []logrus.Level{logrus.InfoLevel, logrus.WarnLevel}, 
    sentry.ClientOptions{
        Dsn: "your-dsn",
        EnableLogs: true, // Required for log entries    
    })
defer logHook.Flush(5 * time.Secod)
logrus.RegisterExitHandler(func() {
    logHook.Flush(5 * time.Second)
})

logger := logrus.New()
logger.AddHook(logHook)
logger.Infof("hello")
  • Add support for flushing events with context using FlushWithContext(). (#​935)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()

if !sentry.FlushWithContext(ctx) {
    // Handle timeout or cancellation
}
  • Add support for custom fingerprints in slog integration. (#​1039)
Deprecations
  • Slog structured logging support replaces Level option with EventLevel and LogLevel options, for specifying fine-grained levels for capturing events and logs.
handler := sentryslog.Option{
    EventLevel: []slog.Level{slog.LevelWarn, slog.LevelError, sentryslog.LevelFatal},
    LogLevel:   []slog.Level{slog.LevelDebug, slog.LevelInfo, slog.LevelWarn, slog.LevelError, sentryslog.LevelFatal},
}.NewSentryHandler(ctx)
  • Logrus structured logging support replaces New and NewFromClient functions to NewEventHook, NewEventHookFromClient, to match the newly added NewLogHook functions, and specify the hook type being created each time.
logHook, err := sentrylogrus.NewLogHook(
    []logrus.Level{logrus.InfoLevel},
    sentry.ClientOptions{})
eventHook, err := sentrylogrus.NewEventHook([]logrus.Level{
    logrus.ErrorLevel,
    logrus.FatalLevel,
    logrus.PanicLevel,
}, sentry.ClientOptions{})
Bug Fixes
  • Fix issue where ContinueTrace() would panic when sentry-trace header does not exist. (#​1026)
  • Fix incorrect log level signature in structured logging. (#​1034)
  • Remove sentry.origin attribute from Sentry logger to prevent confusion in spans. (#​1038)
  • Don't gate user information behind SendDefaultPII flag for logs. (#​1032)
Misc
  • Add more sensitive HTTP headers to the default list of headers that are scrubbed by default. (#​1008)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) June 23, 2025 20:47
@github-actions github-actions bot added the fix label Jun 23, 2025
@renovate renovate bot merged commit 12422c1 into main Jun 23, 2025
6 checks passed
@renovate renovate bot deleted the renovate/github.com-getsentry-sentry-go-0.x branch June 23, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants